package com.matrix.java.chap_03;
/*
    游戏：挑一张牌
 */
public class Ex3_24 {
    public static void main(String[] args) {
        int numberSize = (int) (Math.random() * 13);
        int numberColor = (int) (Math.random() * 4);
        String size = "";
        String color = "";
        switch (numberSize){
            case 0:size ="Ace";break;
            case 1:size ="2";break;
            case 2:size ="3";break;
            case 3:size ="4";break;
            case 4:size ="5";break;
            case 5:size ="6";break;
            case 6:size ="7";break;
            case 7:size ="8";break;
            case 8:size ="9";break;
            case 9:size ="10";break;
            case 10:size ="Jack";break;
            case 11:size ="Queen";break;
            case 12:size ="King";
        }
        switch (numberColor){
            case 0:color = "Clubs";break;
            case 1:color = "Diamonds";break;
            case 2:color = "Hearts";break;
            case 3:color = "Spades";break;
        }
        System.out.println("The card you picked is "+size+" of "+color);
    }
}
